package com.lmz.product.VO.itemVo;

import com.lmz.product.VO.SeckillInfoVo;
import com.lmz.product.entity.SkuImagesEntity;
import com.lmz.product.entity.SkuInfoEntity;
import com.lmz.product.entity.SpuInfoDescEntity;
import lombok.Data;

import java.util.List;

@Data
public class SkuItemVo {
    //sku基本信息 pms_sku_info
    SkuInfoEntity info;
    //sku图片信息 pms_sku_images
    List<SkuImagesEntity> images;
    //spu销售属性组合
    List<skuItemSaleAttrsVo> saleAttr;
    //spu介绍信息
    SpuInfoDescEntity desc;
    //spu规格参数信息
    List<SpuItemAttrGroupVo> groupAttrs;
    //秒杀信息
    SeckillInfoVo seckillInfo;

    boolean hasStock = true;

    @Data
    public static class skuItemSaleAttrsVo {
        private Long attrId;
        private String attrName;
        private List<AttrValueWithSkuIdVo> attrValue;
    }

    @Data
    public static class SpuItemAttrGroupVo {
        private String groupName;
        private List<SpuBaseAttrVo> attrs;
    }

    @Data
    public static class SpuBaseAttrVo {
        private String AttrName;
        private String attrValue;
    }

    @Data
    public static class AttrValueWithSkuIdVo {
        private String attrValue;
        private String skuIds;
    }
}